home *** CD-ROM | disk | FTP | other *** search
- /*
- ** This script is a modification of another script (vc.ged) which was
- ** written by me, so I could compile stuff useing vbcc through GoldEd.
- ** This Script Compliments that script by allowing you to run previously
- ** compiled programs without haveing to re-compile them. I converted
- ** this Script from a Script file written to compile stuff useing gcc
- ** through GoldEd. I truly hope the original author does not mind this.
- ** I hope that whoever finds this script finds it useful in glueing together
- ** a truly cool compiler like vbcc and a killer Editor like GoldEd.
- ** If you have any problems running this script, try messing with it
- ** a little, it's pretty strait forward and can be modified with little
- ** effort. I of course take no liability for anything this script might
- ** do to your computer. (Yeah like a rexx script is gonna do somethin
- ** catostrauphic). I thought that I'de mention it so I don't get blamed
- ** for the end of the world when the highly improbable does happen.
- ** My thanks to Volker Barthelmann for writeing vbcc. Hope you enjoy
- ** useing Golded with vbcc
- **
- ** Sincerely,
- ** Harlock
- **
- */
-
-
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT' /* lock GUI, gain access */
- OPTIONS FAILAT 6 /* ignore warnings */
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- host = ADDRESS() /* get GED's port */
-
- /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
-
- options results
-
- 'QUERY CAT'
-
- 'QUERY ANYTEXT'
-
- if (result = 'TRUE') then
-
- do
- 'QUERY DOC VAR OLDNAME' /* remember current file name */
-
- 'QUERY PATH Var PFAD'
- 'QUERY FILE VAR FNAME'
-
- Name = left(FNAME, Pos('.', FNAME) - 1)
-
- if right(PFAD,1) = ":" then NameB = PFAD || Name
- else NameB = PFAD || '/' || Name
-
- Code = EXISTS(Code)
-
- 'SAVE ALL'
-
- 'REQUEST BODY="Run program ?" BUTTON="_run|_cancel"'
-
- if (result = 1) then do
-
- 'QUERY CON VAR CON'
-
- shell
- run NameB || ' > ' || CON
- shell
-
- end
-
- 'NAME NEW ' || oldname /* restore old file name */
- end
-
- else do
-
- 'REQUEST BODY="Text buffer is empty ?!"'
- end
-
- 'UNLOCK' /* VERY important: unlock GUI */
- Exit
-
- GetFile:PROCEDURE
-
- ARG envv
-
- filename= envv
- IF OPEN(fhandle,filename,"READ") THEN DO
- readed=READLN(fhandle);
- CALL CLOSE(fhandle);
- END;
- ELSE readed = "unset"
-
- RETURN readed
-
-